import React from 'react';
import { Card, Row, Col, Statistic } from 'antd';
import { UserOutlined, ShoppingOutlined, DollarOutlined, ThunderboltOutlined } from '@ant-design/icons';

const DashboardSimple: React.FC = () => {
    console.log('DashboardSimple component rendering');

    const stats = [
        { title: '总用户数', value: 12345, icon: <UserOutlined /> },
        { title: '总订单数', value: 8765, icon: <ShoppingOutlined /> },
        { title: '总收入', value: 234567, icon: <DollarOutlined /> },
        { title: '活跃用户', value: 3456, icon: <ThunderboltOutlined /> }
    ];

    return (
        <div style={{ padding: '20px', backgroundColor: '#f5f5f5', minHeight: '100vh' }}>
            <h1>仪表盘 - 简化版</h1>
            <p>如果你能看到这个页面，说明路由和组件渲染正常。</p>

            <Row gutter={16} style={{ marginTop: '20px' }}>
                {stats.map((stat, index) => (
                    <Col span={6} key={index}>
                        <Card>
                            <Statistic
                                title={stat.title}
                                value={stat.value}
                                prefix={stat.icon}
                            />
                        </Card>
                    </Col>
                ))}
            </Row>

            <Card style={{ marginTop: '20px' }}>
                <h3>系统状态</h3>
                <p>✅ 路由正常工作</p>
                <p>✅ 组件渲染正常</p>
                <p>✅ Antd 组件正常</p>
                <p>✅ 当前时间: {new Date().toLocaleString()}</p>
            </Card>
        </div>
    );
};

export default DashboardSimple;




